package com.lemontree.spring.aop;

import com.lemontree.spring.service.AopService;
import sun.misc.ProxyGenerator;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;

public class ClassMain {
    public static void main(String[] args) throws IOException {
        byte[] byteps = ProxyGenerator.generateProxyClass("com.lemontree.spring.$Proxy1", new Class[]{AopService.class});
        FileOutputStream stream = new FileOutputStream(new File("D://$Proxy2.class"));
        stream.write(byteps);
        stream.close();
    }
}
